#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: api14_application.py 
@version:
@time: 2022/05/07 
"""
from TapClientCore.T02_tm_api.v2_api.v2_api_base import *


class Api14ApplicationUrl(V2ApiUrlBase):
    url_application = api_joint(V2ApiUrlBase().server, 'Applications')


class Api14Application(V2ApiBase):
    def get_application_by_filter(self, _filter):
        response = self.tapclient(
            self.get,
            Api14ApplicationUrl.url_application
            + self.access_token
            + self.filter(_filter)
        )
        return response


if __name__ == '__main__':
    T = Api14Application()
    res = T.get_application_by_filter(
        {"order": "clientName DESC", "limit": 20, "skip": 0, "where": {}}
    )
    from pprint import pprint

    pprint(res)
